Drop mwm hints from api
authorMatthias Clasen <mclasen@redhat.com>
Mon, 9 Mar 2020 19:03:48 +0000 (12:03 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 12 Mar 2020 19:30:11 +0000 (15:30 -0400)
The GdkWMDecoration and GdkWMFunction enums
are no longer used in the api, so move them
to the x11 backend where they are used.

gdk/gdksurface.h
gdk/x11/gdksurface-x11.c

index 7a43059c782a08cc0da9a2ba1db64fde3b791da2..cd11aa368f029110cc8a0ceb11e9163554a9c451 100644 (file)
@@ -76,59 +76,6 @@ typedef enum
   GDK_HINT_USER_SIZE   = 1 << 8
 } GdkSurfaceHints;
 
-/* The next two enumeration values current match the
- * Motif constants. If this is changed, the implementation
- * of gdk_surface_set_decorations/gdk_surface_set_functions
- * will need to change as well.
- */
-/**
- * GdkWMDecoration:
- * @GDK_DECOR_ALL: all decorations should be applied.
- * @GDK_DECOR_BORDER: a frame should be drawn around the surface.
- * @GDK_DECOR_RESIZEH: the frame should have resize handles.
- * @GDK_DECOR_TITLE: a titlebar should be placed above the surface.
- * @GDK_DECOR_MENU: a button for opening a menu should be included.
- * @GDK_DECOR_MINIMIZE: a minimize button should be included.
- * @GDK_DECOR_MAXIMIZE: a maximize button should be included.
- *
- * These are hints originally defined by the Motif toolkit.
- * The window manager can use them when determining how to decorate
- * the surface. The hint must be set before mapping the surface.
- */
-typedef enum
-{
-  GDK_DECOR_ALL                = 1 << 0,
-  GDK_DECOR_BORDER     = 1 << 1,
-  GDK_DECOR_RESIZEH    = 1 << 2,
-  GDK_DECOR_TITLE      = 1 << 3,
-  GDK_DECOR_MENU       = 1 << 4,
-  GDK_DECOR_MINIMIZE   = 1 << 5,
-  GDK_DECOR_MAXIMIZE   = 1 << 6
-} GdkWMDecoration;
-
-/**
- * GdkWMFunction:
- * @GDK_FUNC_ALL: all functions should be offered.
- * @GDK_FUNC_RESIZE: the surface should be resizable.
- * @GDK_FUNC_MOVE: the surface should be movable.
- * @GDK_FUNC_MINIMIZE: the surface should be minimizable.
- * @GDK_FUNC_MAXIMIZE: the surface should be maximizable.
- * @GDK_FUNC_CLOSE: the surface should be closable.
- *
- * These are hints originally defined by the Motif toolkit. The window manager
- * can use them when determining the functions to offer for the surface. The
- * hint must be set before mapping the surface.
- */
-typedef enum
-{
-  GDK_FUNC_ALL         = 1 << 0,
-  GDK_FUNC_RESIZE      = 1 << 1,
-  GDK_FUNC_MOVE                = 1 << 2,
-  GDK_FUNC_MINIMIZE    = 1 << 3,
-  GDK_FUNC_MAXIMIZE    = 1 << 4,
-  GDK_FUNC_CLOSE       = 1 << 5
-} GdkWMFunction;
-
 /**
  * GdkSurfaceEdge:
  * @GDK_SURFACE_EDGE_NORTH_WEST: the top left corner.
index f67573ee6b56d99e060fde9ae40967fd527b1f3e..1be2f82accc3cc4c5b77effe6eeb0c1ef5be83aa 100644 (file)
@@ -3496,6 +3496,17 @@ gdk_surface_set_mwm_hints (GdkSurface *surface,
     XFree (hints);
 }
 
+typedef enum
+{
+  GDK_DECOR_ALL         = 1 << 0,
+  GDK_DECOR_BORDER      = 1 << 1,
+  GDK_DECOR_RESIZEH     = 1 << 2,
+  GDK_DECOR_TITLE       = 1 << 3,
+  GDK_DECOR_MENU        = 1 << 4,
+  GDK_DECOR_MINIMIZE    = 1 << 5,
+  GDK_DECOR_MAXIMIZE    = 1 << 6
+} GdkWMDecoration;
+
 static void
 gdk_x11_surface_set_decorations (GdkSurface      *surface,
                                GdkWMDecoration decorations)
@@ -3540,6 +3551,16 @@ gdk_x11_surface_get_decorations(GdkSurface       *surface,
   return result;
 }
 
+typedef enum
+{
+  GDK_FUNC_ALL          = 1 << 0,
+  GDK_FUNC_RESIZE       = 1 << 1,
+  GDK_FUNC_MOVE         = 1 << 2,
+  GDK_FUNC_MINIMIZE     = 1 << 3,
+  GDK_FUNC_MAXIMIZE     = 1 << 4,
+  GDK_FUNC_CLOSE        = 1 << 5
+} GdkWMFunction;
+
 static void
 gdk_x11_surface_set_functions (GdkSurface    *surface,
                               GdkWMFunction functions)